{template 'common/header'}
<link rel="stylesheet" type="text/css" href="../addons/yzzc_sun_plugin_distribution/template/style/style.css">
<style type="text/css">
	.table-responsive{border: 1px solid #e7e7eb;}
	.table-responsive th{background-color: #f4f6f9;border-right: 1px solid #e7e7eb}
	.table-responsive td{border-right: 1px solid #e7e7eb}
	.table-responsive .btn-primary{border:0; padding: 3px 8px; margin-bottom: 3px;}
</style>
<div class="search-box we7-margin-bottom">
	<form action="" class="search-form  ng-pristine ng-valid" method="get">
		<input type="hidden" name="c" value="account">
		<input type="hidden" name="a" value="manage">
		<div class="input-group" style="width: 400px;">
			<input type="text" name="keyword" value="" class="form-control" placeholder="搜索关键字">
			<span class="input-group-btn"><button class="btn btn-default"><i class="wi wi-search"></i></button></span>
		</div>
	</form>
	<a href="{php echo $this->createWeburl('AddDistributor');}"  class="btn btn-primary we7-padding-horizontal">添加销售</a>
</div>
<ul class="we7-page-tab">
	<li class="active"><a>分销提现</a></li>
</ul>
<div class="clearfix" style="margin-left: -20px;margin-right: -20px;">
	<table class="table table-responsive">
		<tr>
			<th>id</th>
			<th>微信信息</th>
			<th>姓名<br>手机号</th>
			<th>累计佣金<br>可提现佣金</th>
			<th>推荐人</th>
			<th>下级用户</th>
			<th>状态</th>
			<!-- <th>时间</th> -->
			<th>会员订单</th>
			<th>备注信息</th>
			<th>操作</th>
		</tr>
		{loop $list $index $val}
			<tr>
				<td>{$val['id']}</td>
				<td><img src="{$val['img']}" width="30"><br>{$val['name']}</td>
				<td>
					<p>{$val['uname']}</p>
					<p>{$val['mobilephone']}</p>
				</td>
				<td>
					<p>{$val['allcommission']}</p>
					<p>{$val['canwithdraw']}</p>
				</td>
				<td>{$val['referrer_name']}</td>
				<td>
					<a href="">一级：{$val['nextone']}</a>
					{if $info["status"]>=2}<br><a href="">二级：{$val['nexttwo']}</a>{/if}
					{if $info["status"]>=3}<br><a href="">三级：{$val['nextthree']}</a>{/if}
				</td>
				<td>{$status[$val['status']]}</td>
				<!-- <td>
					申请时间：{php echo date("Y-m-d H:i:s",$val['addtime']);}<br>
					审核时间：{php echo date("Y-m-d H:i:s",$val['checktime']);}
				</td> -->
				<td></td>
				<td>{$val['meno']}</td>
				<td>
					{if $val['status']!=1}
						<a href="{php echo $this->createWeburl('SetStatus', array('status'=>1,'id'=>$val[id]));}" class="btn btn-primary" style="background-color: #d9534f;">审核通过</a>
						<br>
					{/if}
					{if $val['status']!=2}
						<a href="{php echo $this->createWeburl('SetStatus', array('status'=>2,'id'=>$val[id]));}" class="btn btn-primary" style="background-color: #0275d8;">驳回</a>
					{/if}
					<a data-toggle="modal" data-target="#myModal{$val['id']}" class="btn btn-primary" style="background-color: #0275d8;">删除</a>
					<div class="modal fade" id="myModal{$val['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                                </div>
                                <div class="modal-body" style="font-size: 20px">
                                    确定删除么？
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <a href="{php echo $this->createWeburl('DeleteDistributor', array('id'=>$val[id]));}" type="button" class="btn btn-info" >确定</a>
                                </div>
                            </div>
                        </div>
                    </div>
				</td>
			</tr>
		{/loop}
	</table>

	<div id="fenye">

	{$pager}

	</div>
</div>
{template 'common/footer'}